import { useState, createContext } from 'react';
// import Comment from './comment';
// import OnChangeVal from './onChangeVal';
import Son from './Son';
import Son2 from './Son2';
import UseEffectTest from './useEffectTest';
import ClearEffect from './clearEffect';
import FuXi from './fuxi24-10-30';
import ReduxTest from './reduxTest';

export const MsgContext = createContext();

function App() {
  const name = 'app to son name';
  const [sonData, setData] = useState()
  const [isShow, setIsShow] = useState(true)
  const [msg, setMsg] = useState('xx')

  const cc = (e) => {
    setData(e)
  }

  return (
    <div className="App">
      {/* <OnChangeVal /> */}
      {/* <Comment /> */}
      {/* <MsgContext.Provider value={msg}>
        <Son 
          name={ name } 
          age={20}
          list={['vue', 'react', 'xxx']}
          obj={{ name: 'jack' }}
          cb={cc}
        >
          <div>ahhahah</div>
          <div>fdjjfajdfsjfdjaskl</div>
        </Son>

        <Son2 sonData={sonData} />
      </MsgContext.Provider>
       */}

       {/* <UseEffectTest /> */}
      {/* { isShow && <ClearEffect />} */}
       {/* <button onClick={() => setIsShow(!isShow)}>电击</button> */}
       {/* <FuXi></FuXi> */}
       <ReduxTest></ReduxTest>
    </div>
  );
}

export default App;
